const Router = require('koa-router')

const { verifyUser, handlePassword } = require("../middleware/user.middleware")
const { verifyAuth } = require('../middleware/auth.middleware.js')
const userRouter = new Router({ prefix: '/users' })
const { create, avatarInfo, getUserInfo } = require("../controller/user.controller")
userRouter.post('/', verifyUser, handlePassword, create)
userRouter.get('/:userId/avatar', avatarInfo)
userRouter.get('/', verifyAuth, getUserInfo)
module.exports = userRouter